f = file("python.txt","w")
while True:
	str=raw_input("input >>")
	if str == 'exit':
		break
	f.write(str + "\n")
	
f.close()